package multitype.loadmore;

/**
 * @author wangzhanghuan
 * @version 1.0
 * @date create 17-6-13
 * @Description
 */

public class LoadMoreItem {
    //0x001,加载中，0x002,加载失败，0x003,没有更多.0x005,空
    public static int LOADING = 0x001;
    public static int LOAD_FAIL = 0x002;
    public static int LOAD_NO_MORE = 0x003;
    public static int LOAD_NORMAL = 0x004;
    public static int LOAD_EMPTY = 0x004;

    private int loadStatus = LOAD_NORMAL;

    public int getLoadStatus() {
        return loadStatus;
    }

    public void setLoadStatus(int loadStatus) {
        this.loadStatus = loadStatus;
    }

    public void setStatusLoadFail() {
        loadStatus = LOAD_FAIL;
    }

    public void setStatusNoMore() {
        loadStatus = LOAD_NO_MORE;
    }

    public void setStatusLoading() {
        loadStatus = LOADING;
    }
    public void setStatusLoadEmpty() {
        loadStatus = LOAD_EMPTY;
    }

    public boolean isLoading() {
        return loadStatus == LOADING ? true : false;
    }

    public boolean isNoMore() {
        return loadStatus == LOAD_NO_MORE ? true : false;
    }
    public boolean isFail() {
        return loadStatus == LOAD_FAIL ? true : false;
    }
    public boolean isEmpty() {
        return loadStatus == LOAD_EMPTY ? true : false;
    }
}
